<!DOCTYPE html>
<html>
<head>
<title>已办任务</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
	    var path = window.document.location.href;
		var pathName = window.document.location.pathname;
		var hostPath = path.substring(0, path.indexOf(pathName));
		var projectName = pathName.substring(0, pathName.substr(1).indexOf("/") + 1);
		document.write('<scr' + 'ipt src="' + projectName + '/js/html/header.js"></scr'+'ipt>');
    </script>
</head>
<body>
	<table id="dg" style="width: auto; height: auto" fitColumns="true">
		<thead>
			<tr>
				<th field="id" align="right" width="40"
					data-options="
					sortable:true,
					remoteSort:false
					">ID</th>
				<th field="procDefId" align="right" width="100" 
					data-options="
					sortable:true,
					remoteSort:false
					">流程定义</th>
				<th field="procDefName" align="right" width="100"
					data-options="
					sortable:true,
					remoteSort:false
					">流程名称</th>
				<th field="businessKey" align="right" width="100"
					data-options="
					sortable:true,
					remoteSort:false
					">业务主键</th>
				<th field="taskDefKey" align="right" width="100" 
					data-options="
					sortable:true,
					remoteSort:false
					">节点ID</th>
				<th field="name" align="right" width="100" 
					data-options="
					sortable:true,
					remoteSort:false
					">节点名称</th>
				<th field="procInstId" align="right" width="60" 
					data-options="
					sortable:true,
					remoteSort:false
					">流程实例ID</th>
				<th field="assignee" align="right" width="100" 
					data-options="
					sortable:true,
					remoteSort:false
					">分配到人</th>
				<th field="startTime" align="right" width="100" 
					data-options="
					sortable:true,
					remoteSort:false
					">开始时间</th>
				<th field="endTime" align="right" width="100" 
					data-options="
					sortable:true,
					remoteSort:false
					">结束时间</th>
			</tr>
		</thead>
	</table>
	<div id="dg-buttons" style="height: auto">
		<div style="margin-bottom:5px">
			<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" 	onclick="comments()">审批轨迹</a>
		</div>
		<div>
			<span>&nbsp;&nbsp;&nbsp;&nbsp;选择:</span>
			<input type="text" id="searchKey" name="searchKey" class="easyui-combobox" />
			<span>等于:</span>
			<input type="text" id="searchValue" name="searchValue" class="easyui-validatebox" />
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" onclick="dgop.find()">查询</a>
		</div>
	</div>
	
	<img id="ImagePic"  style="width: auto; height: auto" />
	
	<script>
		var initd = {
			queryDataURL : "/workflow/history/task/list/curruserdone",
			displayDataURL:"/workflow/process/display",
			pageSize: 10,
			dg : $('#dg')
		};

		function comments() {
			var selectedRows = $("#dg").datagrid("getSelections");
			if (selectedRows.length != 1) {
				$.messager.progress("close");
				$.messager.alert("系统提示", "请选择一条要编辑的数据！");
				return false;
			}
			var row = selectedRows[0];
			var designerUrl = projectName+"/html/workflowManage/taskinfo/approvalComments.html?procInstId=" + row.procInstId + "&taskId=" + row.id;
			var feature = 'top=0, left=0,toolbar=no,menubar=yes, scrollbars=yes, resizable=yes,location=no,status=no,channelmode = yes';
            var newwindows = window.open(designerUrl, "", feature);
            newwindows.moveTo(0, 0); //将新页面打开位置定位在屏幕左上角
            newwindows.resizeTo(screen.width, screen.height); //设置新页面的大小
            if (newwindows != null) {
                newwindows.focus();//新页面获得焦点
            }
		}
		
		
		function formatCellTooltip(val) {
			return '<span title='+val+'>' + val + '</span>';
		}
	</script>
</body>
</html>